package com.qfjy.homework.caijirui;

/**
 * 观察者A
 */
public class ObserverA extends Observer {
    public ObserverA(ObservedObject object) {
        this.object=object;
        this.object.attach(this);
    }

    @Override
    public void update() {
        System.out.println("A观察者观察到变化并更新状态："+object.getState()*object.getState());
    }
}
